Function |checked_div

std/ops/num::|checked_div


Usage

|checked_div<N>(a, b)

Generics

◻ N: CheckedDiv

Parameters

↳ a: N
↳ b: N

Return

↴ Option<N>


Divide a by b, checking if division is possible or if overflow occurs

This function returns an option containing a Ă· b, or none if division is not possible (as division by 0), or result cause overflow in data type.